﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
using xiaolanshu;

namespace xiaolanshu
{
    public partial class 底妆 : Form
    {
        public 底妆()
        {
            InitializeComponent();
        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {
            SqlConnection conn = SQLTools.conn;
            //SqlConnection conn = new SqlConnection(@"server=.\SqlExpress;database=商品详情;integrated security=SSPI");
            string sql = @"select * from 底妆 where 价格=430";

            SqlCommand cmd = new SqlCommand(sql, conn);
            conn.Open();
            SqlDataReader rd = cmd.ExecuteReader();
            rd.Read();
            string mc = rd[0].ToString();
            string jg = rd[1].ToString();
            string jhl = rd[2].ToString();
            string sh = rd[3].ToString();
            string bzq = rd[4].ToString();
            string cd = rd[5].ToString();
            string gx = rd[6].ToString();
            string syfz = rd[7].ToString();
            MessageBox.Show("名称：" + mc + "\r\n" + "价格：￥" + jg + "\r\n" + "净含量：" + jhl + "\r\n" + "色号：" + sh + "\r\n" +
                        "保质期：" + bzq + "\r\n" + "产地：" + cd + "\r\n" + "功效" + gx + "\r\n" + "适用肤质：" + syfz + "\r\n");
            conn.Close();
        }

        private void pictureBox2_Click(object sender, EventArgs e)
        {
            SqlConnection conn = SQLTools.conn;
            //SqlConnection conn = new SqlConnection(@"server=.\SqlExpress;database=商品详情;integrated security=SSPI");
            string sql = @"select * from 底妆 where 价格=950";

            SqlCommand cmd = new SqlCommand(sql, conn);
            conn.Open();
            SqlDataReader rd = cmd.ExecuteReader();
            rd.Read();
            string mc = rd[0].ToString();
            string jg = rd[1].ToString();
            string jhl = rd[2].ToString();
            string sh = rd[3].ToString();
            string bzq = rd[4].ToString();
            string cd = rd[5].ToString();
            string gx = rd[6].ToString();
            string syfz = rd[7].ToString();
            MessageBox.Show("名称：" + mc + "\r\n" + "价格：￥" + jg + "\r\n" + "净含量：" + jhl + "\r\n" + "色号：" + sh + "\r\n" +
                        "保质期：" + bzq + "\r\n" + "产地：" + cd + "\r\n" + "功效" + gx + "\r\n" + "适用肤质：" + syfz + "\r\n");
            conn.Close();
        }

        private void pictureBox3_Click(object sender, EventArgs e)
        {
            SqlConnection conn = SQLTools.conn;
            //SqlConnection conn = new SqlConnection(@"server=.\SqlExpress;database=商品详情;integrated security=SSPI");
            string sql = @"select * from 底妆 where 价格=490";

            SqlCommand cmd = new SqlCommand(sql, conn);
            conn.Open();
            SqlDataReader rd = cmd.ExecuteReader();
            rd.Read();
            string mc = rd[0].ToString();
            string jg = rd[1].ToString();
            string jhl = rd[2].ToString();
            string sh = rd[3].ToString();
            string bzq = rd[4].ToString();
            string cd = rd[5].ToString();
            string gx = rd[6].ToString();
            string syfz = rd[7].ToString();
            MessageBox.Show("名称：" + mc + "\r\n" + "价格：￥" + jg + "\r\n" + "净含量：" + jhl + "\r\n" + "色号：" + sh + "\r\n" +
                        "保质期：" + bzq + "\r\n" + "产地：" + cd + "\r\n" + "功效" + gx + "\r\n" + "适用肤质：" + syfz + "\r\n");
            conn.Close();
        }

        private void pictureBox4_Click(object sender, EventArgs e)
        {
            SqlConnection conn = SQLTools.conn;
            //SqlConnection conn = new SqlConnection(@"server=.\SqlExpress;database=商品详情;integrated security=SSPI");
            string sql = @"select * from 底妆 where 价格=650";

            SqlCommand cmd = new SqlCommand(sql, conn);
            conn.Open();
            SqlDataReader rd = cmd.ExecuteReader();
            rd.Read();
            string mc = rd[0].ToString();
            string jg = rd[1].ToString();
            string jhl = rd[2].ToString();
            string sh = rd[3].ToString();
            string bzq = rd[4].ToString();
            string cd = rd[5].ToString();
            string gx = rd[6].ToString();
            string syfz = rd[7].ToString();
            MessageBox.Show("名称：" + mc + "\r\n" + "价格：￥" + jg + "\r\n" + "净含量：" + jhl + "\r\n" + "色号：" + sh + "\r\n" +
                        "保质期：" + bzq + "\r\n" + "产地：" + cd + "\r\n" + "功效" + gx + "\r\n" + "适用肤质：" + syfz + "\r\n");
            conn.Close();
        }

        private void pictureBox5_Click(object sender, EventArgs e)
        {
            SqlConnection conn = SQLTools.conn;
            //SqlConnection conn = new SqlConnection(@"server=.\SqlExpress;database=商品详情;integrated security=SSPI");
            string sql = @"select * from 底妆 where 价格=520";

            SqlCommand cmd = new SqlCommand(sql, conn);
            conn.Open();
            SqlDataReader rd = cmd.ExecuteReader();
            rd.Read();
            string mc = rd[0].ToString();
            string jg = rd[1].ToString();
            string jhl = rd[2].ToString();
            string sh = rd[3].ToString();
            string bzq = rd[4].ToString();
            string cd = rd[5].ToString();
            string gx = rd[6].ToString();
            string syfz = rd[7].ToString();
            MessageBox.Show("名称：" + mc + "\r\n" + "价格：￥" + jg + "\r\n" + "净含量：" + jhl + "\r\n" + "色号：" + sh + "\r\n" +
                        "保质期：" + bzq + "\r\n" + "产地：" + cd + "\r\n" + "功效" + gx + "\r\n" + "适用肤质：" + syfz + "\r\n");
            conn.Close();
        }

        private void pictureBox6_Click(object sender, EventArgs e)
        {
            SqlConnection conn = SQLTools.conn;
            //SqlConnection conn = new SqlConnection(@"server=.\SqlExpress;database=商品详情;integrated security=SSPI");
            string sql = @"select * from 底妆 where 价格=380";

            SqlCommand cmd = new SqlCommand(sql, conn);
            conn.Open();
            SqlDataReader rd = cmd.ExecuteReader();
            rd.Read();
            string mc = rd[0].ToString();
            string jg = rd[1].ToString();
            string jhl = rd[2].ToString();
            string sh = rd[3].ToString();
            string bzq = rd[4].ToString();
            string cd = rd[5].ToString();
            string gx = rd[6].ToString();
            string syfz = rd[7].ToString();
            MessageBox.Show("名称：" + mc + "\r\n" + "价格：￥" + jg + "\r\n" + "净含量：" + jhl + "\r\n" + "色号：" + sh + "\r\n" +
                        "保质期：" + bzq + "\r\n" + "产地：" + cd + "\r\n" + "功效" + gx + "\r\n" + "适用肤质：" + syfz + "\r\n");
            conn.Close();
        }

        private void uiButton3_Click(object sender, EventArgs e)
        {
            色号介绍 form = new 色号介绍();
            form.ShowDialog();
        }

        private void uiButton4_Click(object sender, EventArgs e)
        {

            toolTip1.ShowAlways = true;
            toolTip1.SetToolTip(uiButton4, "点我进入护肤界面");
            护肤 form = new 护肤();
            form.ShowDialog();


        }

        private void uiButton1_Click(object sender, EventArgs e)
        {
            大V心得 form = new 大V心得();
            form.ShowDialog();

        }

        private void uiButton2_Click(object sender, EventArgs e)
        {
            底妆_反馈 form = new 底妆_反馈 ();
            form.ShowDialog();
        }

        private void 底妆_Load(object sender, EventArgs e)
        {

        }
    }
}
